{% extends 'base.html' %}
{% block title %}domain list{% endblock %}
{% block content %}
{% load pagination_tags %}
{% autopaginate results 25 %}
<div style="margin: 10px;">
	{% paginate %}
</div>
<div style="float: right; margin: 10px;">
	<h1>Search</h1>
	<form action="/dns/record/search/" method="GET">
	  <label for="q">Search: </label>
	  <input type="text" name="q" value="{{ query|escape }}">
	  <input type="submit" value="Search">
	</form>
</div>
<div style="clear: both;">
</div>
<div style="margin: 10px;">
	{% if query %}
	    <h2>Your query for "{{ query|escape }}":</h2>

	    {% if results %}
		 <p>The following Records matched your query:</p>
	      <table>
	      {% for item in results %}
	        <tr><td><a href="/dns/record/{{ item.id }}">{{ item|escape }}</td>
		<td><a href="/dns/record/edit/{{ item.id }}">edit</a></td><td><a href="/dns/record/delete/{{ item.id }}">delete</a></td>
		</tr>
	      {% endfor %}
	      </table>
	    {% else %}
	      <p>No Records matched your query.</p>
	    {% endif %}
	{% endif %}
</div>
{% endblock %}
